-
Notifications
You must be signed in to change notification settings - Fork 32
Pin GHA dependencies by hash #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pin GHA dependencies by hash #197
Conversation
|
Thanks. Could you please let me know how to obtain the GitHub action SHA, |
|
@wkliao I'd recommend using Dependabot to automatically create dependency update PRs for GitHub Actions. Dependabot can update the hash and comment. Usage of a dependency-update tool is another of the OpenSSF scorecard metrics. Kitware has funding to help PESO member projects improve security by implementing the OpenSSF scorecard recommendations. If you're interested, I'd be happy to make a follow-up PR to add a Dependabot config to create update PRs for these actions automatically. |
fbb6846 to
63b6575
Compare
|
@wkliao I see that you rebased my branch. Is there anything I need to do to get this merged at this point? |
|
I think this was done automatically by GitHub when the branch ( |
Could you please help me understand better of this PR? |
|
@wkliao Tags can be reassigned, meaning that tags can be reassigned to malicious commit if a GHA is compromised. A high profile example of this is the tj-actions hack last year. All projects using hash-pinned dependencies were unaffected, while projects using the tag were compromised. |
|
Thanks for your prompt reply. I understand the risk when using a third-party software. However, PnetCDF does have some dependencies on other 3rd party software, such as MPICH, OpenMPI, etc. |
|
@wkliao While |
|
Thanks. Could you please update this PR by adding that Dependabot configuration you mentioned earlier, to enable the hash number retrieval automatically? In addition, all yaml files were recently split into two to shorten their run time. |
Hash-pinned dependencies are an important requirement enforced by the OpenSSF scorecard tool: https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies This commit pins all GitHub Actions workflows to a commit hash.
This commit adds a basic Dependabot configuration for GitHub Actions workflow updates. In addition to keeping dependencies fresh, adding a Dependabot configuration allows the project to receive Dependabot security alerts if configured in the project settings: https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates
ce68c7c to
2e8dc2b
Compare
|
@wkliao Done. I just applied the same changes to each of the new files and added a Dependabot config for GitHub Actions. |
|
@wkliao FYI, Dependabot will run immediately any time you edit the config file, so Dependabot will run immediately as soon as this PR is merged. You can also run Dependabot manually via the link in the repo settings (again, once this PR is merged and the default branch has a Dependabot config). |
88684a9 to
2e8dc2b
Compare
|
Thanks for the info and your PR. |
|
Here's a PR Dependabot created as a result of the initial run: #205 |
Hash-pinned dependencies are an important requirement enforced by the OpenSSF scorecard tool: https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies
This commit pins all GitHub Actions workflows to a commit hash.